import { cloneDeep } from 'lodash'

interface IPage {
  total: number,
  current: number,
  pageSize: number,
}

export const usePageSearch = (searchF: object, page: IPage ) => {
  const page1 = cloneDeep(page || {})
  page1.size = page1.pageSize
  return { ...searchF, ...page1 }
}